/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Server;

import java.io.*;

/**
 * The ServerConfiguration class
 * contains static methods which
 * retrieves the information about
 * the current server parameters like
 * Public Key from the serverConfiguration
 * File.
 * @author Jithesh, Nevil, Saurav, Sajin ,Vineeth
 */
public class ServerConfiguration {

	/**
	 * @return The public key of the server.
	 */
	public static String getPublicKey() {
		BufferedReader cfgFile;
		String publicKey = null;

		try {
			cfgFile = new BufferedReader(new FileReader("src/Server/Server.cfg") );
			publicKey = cfgFile.readLine().trim();
		} catch(FileNotFoundException fexp) {
			System.err.println( "Error Occured " + fexp.getMessage() );
		} catch(IOException iexp ) {
			System.err.println("Error Occured " + iexp.getMessage() );
		}
				
		return publicKey;
	}
}
